<template>
  <div>
    <child1></child1>
    <hr />
    <child2 v-if="show"></child2>
    <button @click="handClick">切换Child2的展示</button>
  </div>
</template>

<script>
import Child1 from './Child1.vue'
import Child2 from './Child2.vue'
export default {
  name: 'page-day34',
  components: { Child1, Child2 },
  data() {
    return {
      show: true
    }
  },
  methods: {
    handClick() {
      this.show = !this.show
    }
  }
}
</script>

<style lang="scss" scoped></style>
